package com.project.application.framework.security;

import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 用户登录对象
 *
 * @author levnli
 */
@Data
@Accessors(chain = true)
public class LoginBody {
    /**
     * 用户名
     */
    @NotBlank
    @Size(min = 5, max = 30, message = "账号长度5-30")
    @ApiParam(defaultValue = "admin")
    private String username;

    /**
     * 用户密码
     */
    @NotBlank
    @Size(min = 5, max = 30, message = "密码长度5-30")
    @ApiParam(defaultValue = "admin123")
    private String password;

    /**
     * 验证码
     */
    private String code;

    /**
     * 唯一标识
     */
    private String uuid = "";
}
